<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 文本框 -->
    <input type="text" v-model="msg">
    {{msg}}
    <!-- 单选框 -->
    <hr>
    性别：
    <label for="male">男</label>
    <input type="radio" value="male"  id="male" v-model="gender">
    <label for="female">女</label>
    <input type="radio" value="female"  id="female" v-model="gender">
    {{gender}}
    <hr>
    爱好：
    <label for="lanqiu">篮球</label>
    <input type="checkbox" value="篮球"  id="lanqiu" v-model="hobbies">
    <label for="zuqiu">足球</label>
    <input type="checkbox" value="足球"  id="zuqiu" v-model="hobbies">
    <label for="piqiu">皮球</label>
    <input type="checkbox" value="皮球"  id="piqiu" v-model="hobbies">
    <br>
    {{hobbies}}
    <hr>
    <!-- 
      只有一个 复选框，绑定不是value 而是 checked属性
     -->
     <input type="checkbox" v-model="isBeauty">
     {{
      isBeauty
      ?
      '大美女'
      :
      '你是好姑娘'
     }}
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    // 创建应用实例
    const app = createApp({
      data(){
        return {
          msg: '初始值',
          gender: 'female',
          hobbies: ['足球'],
          isBeauty: true
        }
      }
    })
    app.mount('#app')
  </script>
</body>
</html>